package com.lqq.service;

import com.lqq.dao.UserRepository;
import com.lqq.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author lqq
 * @date 2019/3/6
 */
@Service
public class UserService {

    @Autowired
    private UserRepository userRepository;

    public User findUserByName(String username) {
        return userRepository.findUserByUsername(username);
    }

    public void saveUser(User user) {
        userRepository.save(user);
    }
}
